package com.hdax.dmw.common.utils;

//枚举
public enum ServiceResultEnum {
    ERROR("1001","error"),

    SUCCESS("1001","success"),

    DATA_NOT_EXIST("1001","未查询到记录！"),

    PARAM_ERROR("1001","参数错误！"),

    SAME_CATEGORY_EXIST("1001","已存在同级同名的分类！"),

    SAME_LOGIN_NAME_EXIST("1001","用户名已存在！"),

    LOGIN_NAME_NULL("1001","请输入登录名！"),

    LOGIN_NAME_IS_NOT_PHONE("1001","请输入正确的手机号！"),

    LOGIN_PASSWORD_NULL("1001","请输入密码！"),

    LOGIN_VERIFY_CODE_NULL("1001","请输入验证码！"),
    LOGIN_VERIFY_CODE_REPEAT("1001","请不要重复获取验证码！"),
    LOGIN_VERIFY_CODE_EXPIRE("1001","验证码已过期，请重新获取！"),

    LOGIN_VERIFY_CODE_ERROR("1001","验证码错误！"),

    SAME_INDEX_CONFIG_EXIST("1001","已存在相同的首页配置项！"),

    GOODS_CATEGORY_ERROR("1001","分类数据异常！"),

    SAME_GOODS_EXIST("1001","已存在相同的商品信息！"),

    GOODS_NOT_EXIST("5003","商品不存在！"),

    GOODS_PUT_DOWN("1001","商品已下架！"),

    SHOPPING_CART_ITEM_LIMIT_NUMBER_ERROR("1001","超出单个商品的最大购买数量！"),

    SHOPPING_CART_ITEM_NUMBER_ERROR("1001","商品数量不能小于 1 ！"),

    SHOPPING_CART_ITEM_TOTAL_NUMBER_ERROR("1001","超出购物车最大容量！"),

    SHOPPING_CART_ITEM_EXIST_ERROR("1001","已存在！无需重复添加！"),

    LOGIN_ERROR("1001","登录失败！"),

    NOT_LOGIN_ERROR("1001","未登录！"),

    ADMIN_NOT_LOGIN_ERROR("1001","管理员未登录！"),

    TOKEN_EXPIRE_ERROR("1001","无效认证！请重新登录！"),

    ADMIN_TOKEN_EXPIRE_ERROR("1001","管理员登录过期！请重新登录！"),

    USER_NULL_ERROR("1001","无效用户！请重新登录！"),

    LOGIN_USER_LOCKED_ERROR("1001","用户已被禁止登录！"),

    ORDER_NOT_EXIST_ERROR("1001","订单不存在！"),

    ORDER_ITEM_NOT_EXIST_ERROR("1001","订单项不存在！"),

    NULL_ADDRESS_ERROR("1001","地址不能为空！"),

    ORDER_PRICE_ERROR("1001","订单价格异常！"),

    ORDER_ITEM_NULL_ERROR("5004","订单项异常！"),

    ORDER_GENERATE_ERROR("1001","生成订单异常！"),

    SHOPPING_ITEM_ERROR("1001","购物车数据异常！"),

    SHOPPING_ITEM_COUNT_ERROR("1001","库存不足！"),

    ORDER_STATUS_ERROR("5001","订单状态异常！"),

    CLOSE_ORDER_ERROR("5002","关闭订单失败！"),

    OPERATE_ERROR("1001","操作失败！"),

    REQUEST_FORBIDEN_ERROR("1001","禁止该操作！"),

    NO_PERMISSION_ERROR("1001","无权限！"),

    DB_ERROR("1001","database error");

    private String result;
    private String errorCode;

    public String getErrorCode() {
        return errorCode;
    }

    public void setErrorCode(String errorCode) {
        this.errorCode = errorCode;
    }

    ServiceResultEnum(String errorCode,String result) {
        this.errorCode = errorCode;
        this.result = result;
    }

    public String getResult() {
        return result;
    }

    public void setResult(String result) {
        this.result = result;
    }
}
